package org.numb.chapter01;

import org.apache.curator.RetryPolicy;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;

public class Launcher {

    private static final String ZK_ADDRESS = "124.221.113.26:12181,124.221.113.26:12182,124.221.113.26:12183";

    public static void main(String[] args) {
        RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
        CuratorFramework client = CuratorFrameworkFactory.newClient(ZK_ADDRESS, retryPolicy);
        client.start();
        try {
            client.create().forPath("/configuration");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
